<?php

namespace StarCloud\Services;

use StarCloud\Library\Factory\WechatFactory;
use StarCloud\Library\Sdk\Wechat;

class WechatService extends BaseService
{
    public static function hook($app)
    {
        $wechat = WechatFactory::getWechatInstance($app);
        $wechat->valid();
        $wechat->getRev();
        self::businessHook($wechat);
    }

    private static function businessHook(Wechat $wechat)
    {
        $wechat->text("火石生态养殖，欢迎您")->reply();
    }
}
